package com.allo2o.common.convertor;

import com.allo2o.common.VO.MerchantInfoVO;
import com.allo2o.common.domain.MerchantInfoDO;
import org.springframework.beans.BeanUtils;

/**
 * <ul>
 * merchantinfo convertor
 * </ul>
 * Created by lubingbing on 16-5-5.
 */
public class MerchantInfoConvertor {

    public static MerchantInfoDO VO2DOConvert(MerchantInfoVO vo) {
        if (vo == null) {
            return null;
        }
        MerchantInfoDO dto = new MerchantInfoDO();
        BeanUtils.copyProperties(vo, dto);
        return dto;
    }

    public static MerchantInfoVO DO2VOConvert(MerchantInfoDO dto) {
        if (dto == null) {
            return null;
        }
        MerchantInfoVO vo = new MerchantInfoVO();
        BeanUtils.copyProperties(dto, vo);
        vo.setUserType(dto.getUserType());
        return vo;
    }
}
